<#include "/common/common.ftl" encoding="UTF-8">
	<link href="${staticUrl}/css/form.css" type="text/css" rel="stylesheet" />
	<link href="${staticUrl}/js/validate/jquery.validate.css" type="text/css" rel="stylesheet" />
	<script src="${staticUrl}/js/validate/jquery.validate.js" type="text/javascript"></script>
	<script src="${staticUrl}/js/validate/messages_cn.js" type="text/javascript"></script>
<script src="${staticUrl}/js/popup.js" type="text/javascript"></script>
<script src="${staticUrl}/js/interface.js" type="text/javascript"></script>
<link href="${staticUrl}/css/popup.css" type="text/css" rel="stylesheet" />
<style type="text/css">
	#popupContact{
		position:fixed;
		height:50%;
		width:50%;
		background:#FFFFFF;
		border:2px solid #cecece;
		z-index:2;
		padding:12px;
		font-size:13px;
	}
</style>
	<#assign action="leave-word">
	<script>
		$(document).ready(function(){
			//为inputForm注册validate函数
			$("#inputForm").validate();
	      var toolbar = new Toolbar({
	        renderTo : 'button',
			//border: 'top',
	        items : [{
	          type : 'button',
	          text : '回复',
	          bodyStyle : 'modify',
	          useable : 'T',
	          handler : function(){
	          	resolvent();
	          }
	        },'-',{
	          type : 'button',
	          text : '发布/隐藏',
	          bodyStyle : 'publish',
	          useable : 'T',
	          handler : function(){
				$.ajax({url: "${request.contextPath}/security/${action}!publish.action?id=${id}&" + new Date().getTime(),
					type: 'GET',dataType: 'html',
					timeout: 30000,
					error: function(){},    
					success: function (data){
													alert(data);
											}
				});
	          }
	        }],
	        azable : false
	      });
		  toolbar.render();
			$("#popupContact").hide();
		});
		//回复
		function resolvent(){
			loadPopup('popupContact');
			centerPopup('popupContact');
			scroll(0,0);
		}
	</script>
</head>
<body>

<div id="button"></div>
<div class="title">留言管理</div>
<div id="inputContent" class="content">
<form id="inputForm" action="${action}!resolvent.action" method="post">
<div id="popupContact" class='popupContact'>
	<div style="width:420px;text-align:center;">
		回复信息		
	</div>
	<div>
        <textarea name="resolventStr" style="height:150px;width:420px;">${(resolvent)?if_exists}</textarea>
	</div>
	<div align='center'>
        <input type="submit" name="Submit2" value="提   交" >
        <input type="button" name="Submit3" value="取   消" onClick="javascript:disablePopup('popupContact');">
    </div>
</div>
<input type="hidden" name="id" value="${(id)?if_exists}" />
<table class="content">
	<tr>
		<@ftlMacro.detailText  descript="联系人" textShow="${name?if_exists}" cssStyle="required"/>
		<@ftlMacro.detailText  descript="qq" textShow="${qq?if_exists}" cssStyle="required"/>
	</tr>
	<tr>
		<@ftlMacro.detailText  descript="email" textShow="${email?if_exists}" cssStyle="required"/>
		<@ftlMacro.detailText  descript="电话" textShow="${telephone?if_exists}" cssStyle="required"/>
	</tr>
	<tr>
        <td class="textLabel"><div class='descript' >是否公开：</div>
        </td>
        <td class="textShow">
            <div  class='divshow'><#if isOpen?exists && isOpen==1>是<#else>否</#if></div>
        </td>
        <td class="textLabel"><div class='descript' >状态：</div>
        </td>
        <td class="textShow">
            <div  class='divshow'><#if status?exists && status=1>已处理<#else>未处理</#if></div>
        </td>
	</tr>
	<tr>
		<@ftlMacro.detailText  descript="联系地址" textShow="${other?if_exists}" cssStyle="required" colspan="3"/>
	</tr>
	<tr>
		<@ftlMacro.detailText descript="标题" textShow="${title?if_exists}" cssStyle="required" colspan="3"/>
	</tr>
	<tr>
		<@ftlMacro.detailText  descript="留言内容" textShow="${description?if_exists}" cssStyle="required" colspan="3"/>
	</tr>
	<#if resolvent?exists>
	<tr>
		<@ftlMacro.detailText  descript="回复内容" textShow="${resolvent?if_exists}" cssStyle="required" colspan="3"/>
	</tr>
	</#if>
	<tr>
		<@ftlMacro.detailText descript="留言时间" textShow="${createTime?if_exists}"/>
		<@ftlMacro.detailText descript="回复时间" textShow="${replayTime?if_exists}"/>
	</tr>
	<tr>
		<td colspan="4">
		</td>
	</tr>
</table>
</form>
</div>
</body>
</html>